/*
 * Copyright (c) Zhongkehonglue Technologies Co., Ltd. 2025. All rights reserved.
 * Description: Implementation of functions related to the DMC module.
 * Author: wangchunyang
 * Create: 2025-05-23
 */

#ifndef DMC_API_H
#define DMC_API_H

#include <string>
#include "dmcApiTypes.h"

namespace DlnaDmc {

class DmcApi {
public:
    DmcApi() {};
    DmcApi(const DmcApi&) = delete;
    DmcApi& operator=(const DmcApi&) = delete;
    DmcApi(DmcApi&&) = delete;
    DmcApi& operator=(DmcApi&&) = delete;
    dmc_int32 InitEnv(const std::string &ifName, const DmcCbType &cb);
    dmc_int32 DestroyEnv();
    dmc_int32 SetAvTransportURI(dmc_uint32 deviceId, dmc_uint32 instanceId,
        const std::string &uri, const std::string &metaData);
    dmc_int32 Play(dmc_uint32 deviceId, dmc_uint32 instanceId, const std::string &playSpeed);
    dmc_int32 Pause(dmc_uint32 deviceId, dmc_uint32 instanceId);
    dmc_int32 Stop(dmc_uint32 deviceId, dmc_uint32 instanceId);
    dmc_int32 Seek(dmc_uint32 deviceId, dmc_uint32 instanceId, DmcSeekMode seekMode,
        const std::string &seekTarget);
    dmc_int32 SetVolume(dmc_uint32 deviceId, dmc_uint32 instanceId,
        DmcChannelType enChannel, dmc_uint32 volume);
    dmc_int32 GetVolume(dmc_uint32 deviceId, dmc_uint32 instanceId,
        DmcChannelType enChannel, dmc_uint32 &currentVolume);
    dmc_int32 SetMute(dmc_uint32 deviceId, dmc_uint32 instanceId,
        DmcChannelType enChannel, bool mute);
    dmc_int32 GetPositionInfo(dmc_uint32 deviceId, dmc_uint32 instanceId, DmrTrackPosition &trackPos);
    dmc_int32 GetTransportInfo(dmc_uint32 deviceId, dmc_uint32 instanceId,
        DmcTransportState &transportState, DmcTransportStatus &transportStatus, std::string &playSpeed);
};

}
#endif /* DMC_API_TYPES_H */